<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>分类管理</title>
    <script type="text/javascript" src="__STATIC__/js/jquery-1.7.2.min.js"></script>
    <link rel="stylesheet" href="__STATIC__/bootstrap/css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="__STATIC__/hdjs/hdjs.css">
    <script type="text/javascript" src="__STATIC__/hdjs/hdjs.min.js"></script>
</head>
<body>
<div class="wrap">
    <div class="hd-title-header">修改分类</div>
    <form action="javascript:;" onsubmit="return hd_submit(this,'{|U:'Category/edit'}','{|U:'Category/index'}')" class="form-inline hd-form">
        <table class="hd-table hd-table-list">
            <tr>
                <th class="w100">分类名称</th>
                <td  class="w100">
                    <input type="text" name="cname" class="w200" value="{$data.cname}" /> 
                </td>
                <td></td>
            </tr>
            <tr>
                <th class="w100">所属分类</th>
                <td>
                    <select name="pid" class="w200">
                        <option value="0">顶级分类</option>
                        <foreach from="$top_cate" key="$k" value="$v">
                            <option value="{$v.cid}"<if value="$data.pid==$v.cid">selected="selected"</if>>{$v.cname}</option>
                        </foreach>
                    </select>
                </td>
                <td></td>
            </tr>
            <if value="$data.pid">
                <tr>
                    <th class="w100">所属类型</th>
                    <td>
                        <select name="f_type_tid" class="w200">
                            <!-- <option value="">请选择类型</option> -->
                            <foreach from="$type_data" key="$k" value="$v">
                                <option value="{$v.tid}" <if value="$data.f_type_tid==$v.tid">selected="selected"</if>>{$v.tname}</option>
                            </foreach>
                        </select>
                    </td>
                    <td></td>
                </tr>
            </if>
            <tr>
                <th class="w100">分类排序</th>
                <td>
                    <input type="text" name="sort" class="w200" value="100"/>
                </td>
                <td>请填写1到65535的排序数字 </td>
            </tr>
        </table>
        <div class="position-bottom">
            <input type="hidden" name="cid" value="{$data.cid}" />
            <input type="submit" class="btn btn-primary" value="修改" style="margin:20px 20px 0px 20px" />
            <input type="button" class="btn btn-danger" value="返回" style="margin:20px 20px 0px 0px" />
        </div>
        <script type="text/javascript">
            $('.position-bottom .hd-btn-danger').click(function() {
                location.href="{|U:'Category/index'}"
            });
        </script>
    </form>
</div>
</body>
</html>